package(default_visibility=["//visibility:public"])
load("@angular//:index.bzl", "ng_module")
load("@io_bazel_rules_sass//sass:sass.bzl", "sass_library", "sass_binary")


ng_module(
  name = "snack-bar",
  srcs = glob(["**/*.ts"], exclude=["**/*.spec.ts"]),
  module_name = "@angular/material/snack-bar",
  assets = [
    ":snack-bar-container.css",
    ":simple-snack-bar.css",
  ] + glob(["**/*.html"]),
  deps = [
    "//src/lib/button",
    "//src/lib/core",
    "//src/cdk/a11y",
    "//src/cdk/layout",
    "//src/cdk/overlay",
    "//src/cdk/portal",
    "@rxjs",
  ],
  tsconfig = "//src/lib:tsconfig-build.json",
)

# TODO(jelbourn): replace this w/ sass_library when it supports acting like a filegroup
filegroup(
  name = "snack_bar_scss_partials",
  srcs = glob(["**/_*.scss"]),
)

sass_binary(
  name = "snack_bar_container_scss",
  src = "snack-bar-container.scss",
  deps = ["//src/lib/core:core_scss_lib"],
)

sass_binary(
  name = "simple_snack_bar_scss",
  src = "simple-snack-bar.scss",
  deps = ["//src/lib/core:core_scss_lib"],
)

sass_library(
  name = "theme",
  srcs = glob(["**/*-theme.scss"]),
)
